package com.lechuang.member.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lechuang.common.model.BaseEntity;
import com.lechuang.member.entity.MemberGroupBuyLevel;
import com.lechuang.member.entity.MemberLevel;
import com.lechuang.member.service.MemberGroupBuyLevelService;
import com.lechuang.member.mapper.MemberGroupBuyLevelMapper;
import org.springframework.stereotype.Service;

/**
* @author apple
* @description 针对表【member_group_buy_level】的数据库操作Service实现
* @createDate 2024-06-22 14:39:28
*/
@Service
public class MemberGroupBuyLevelServiceImpl extends ServiceImpl<MemberGroupBuyLevelMapper, MemberGroupBuyLevel>
    implements MemberGroupBuyLevelService{

    @Override
    public MemberGroupBuyLevel queryDefalut() {
        MemberGroupBuyLevel memberGroupBuyLevel = this.lambdaQuery()
                .eq(MemberGroupBuyLevel::getDefaultFlag, MemberLevel.DEFAULT_FLAG)
                .eq(MemberGroupBuyLevel::getStatus, BaseEntity.STATUS_NORMAL)
                .one();
        return memberGroupBuyLevel;
    }
}




